package com.app.micaihu.bean.game;

import android.text.TextUtils;

import com.app.micaihu.bean.InstallBean;
import com.app.utils.util.StringUtils;

import java.io.Serializable;

/**
 * 游戏下载实体
 * Created by linkai on 2017/3/14.
 */
public class GameDownloadEntity extends InstallBean implements IDownload, Serializable {

    private String id;
    private String name;// 应用名称
    private String describe;// 应用描述
    private String logo;// 应用logo的下载地址
    private String app_url;// app的下载地址
    private String tag;//下载标识
    private String appSize;//文件大小
    private String path;//保存的文件名
    private String scrole;//分数

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public String getApp_url() {
        return app_url;
    }

    public void setApp_url(String app_url) {
        this.app_url = app_url;
    }

    public String getAppSize() {
        return appSize;
    }

    public void setAppSize(String appSize) {
        this.appSize = appSize;
    }

    @Override
    public String getIUrl() {
        return getApp_url();
    }

    @Override
    public String getIPath() {
        return getPath();
    }

    @Override
    public String getITitle() {
        return getName();
    }

    @Override
    public String getIPackageName() {
        return getPackageName();
    }

    @Override
    public String getITag() {
        if (TextUtils.isEmpty(tag)) {
            tag = StringUtils.macthUrl(getApp_url());
        }

        return tag;
    }

    @Override
    public String getIGameId() {
        return getId();
    }

    @Override
    public String getIAppIcon() {
        return getLogo();
    }

    @Override
    public String getIGameSummary() {
        return getDescribe();
    }

    @Override
    public String getISize() {
        return getAppSize();
    }

    @Override
    public int getStatus() {
        return status;
    }

    private int status;//4的时候 已下架

    public void setStatus(int status) {
        this.status = status;
    }
}
